package com.panshi.modules.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.panshi.po.RevertAll;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author 857
 * @since 2020-07-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="QaAnswerComment对象", description="")
public class QaAnswerComment implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "回答表的评论id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "评论人ID")
    private Long userId;

    @ApiModelProperty(value = "评论所属回答ID")
    private Long answerId;

    @ApiModelProperty(value = "评论父ID")
    private Long parentId;

    @ApiModelProperty(value = "等级")
    private Integer levle;

    @ApiModelProperty(value = "评论内容")
    private String content;

    @ApiModelProperty(value = "评论时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;

    @ApiModelProperty(value = "点赞量")
    private Integer raiseNum;

    @ApiModelProperty(value = "状态:0-下架,1-上架")
    private Integer status;

    @ApiModelProperty(value = "用户映射")
    @TableField(exist = false)
    private UserMember userMember;

    @ApiModelProperty(value = "子评论数量")
    @TableField(exist = false)
    private Integer count;

    @ApiModelProperty(value="子级回复")
    @TableField(exist = false)
    private List<QaAnswerComment> qaAnswerCommentList;
}
